<template>
    <div></div>
</template>

<script setup lang="ts">
import { onMounted, ref } from "vue";
import { getMyProjectManager } from "@/getMyProjectManager";
import { ESImageLabel } from "esobjs-xe2-plugin/dist-node/esobjs-xe2-plugin-main";
// @ts-ignore
import base64 from "../assets/base64.json"
const myProjectManager = getMyProjectManager()

myProjectManager.viewerCreatedEvent.don(() => {
    // 综合楼
    let poi1 = myProjectManager.createSceneObject(ESImageLabel)
    if (poi1) {
        poi1.position = [114.04264173368466, 38.06734126236259, 312.12018865860153] as [number, number, number]
        poi1.sizeByContent = true
        poi1.actorTag = "floor_zonghelou_7"
        poi1.positionOffset = [-3, 10, 30]
        poi1.allowPicking = true
        poi1.url = base64.zonghelou
        poi1.widgetEvent.don((e) => {
            if (e && e.type === "leftClick") {
                myProjectManager.buildingCollection.toggleFloor('综合楼', true, 1)
            }
        })
    }


    // 餐厅
    let poi2 = myProjectManager.createSceneObject(ESImageLabel)
    if (poi2) {
        poi2.position = [114.04297482073707, 38.067959716817334, 294.1594204218344] as [number, number, number]
        poi2.actorTag = "floor_canting_4"
        poi2.sizeByContent = true
        poi2.positionOffset = [27, 77, 14]
        poi2.url = base64.canting
        poi2.allowPicking = true
        poi2.widgetEvent.don((e) => {
            if (e && e.type === "leftClick") {
                myProjectManager.buildingCollection.toggleFloor('餐厅', true, 1)
            }
        })
    }

})







</script>
<style scoped></style>